import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DiscountsCdkLogVO, DiscountsCdkLogForm, DiscountsCdkLogQuery } from '@/api/system/discountsCdkLog/types';

/**
 * 查询优惠券券码记录列表
 * @param query
 * @returns {*}
 */

export const listDiscountsCdkLog = (query?: DiscountsCdkLogQuery): AxiosPromise<DiscountsCdkLogVO[]> => {
  return request({
    url: '/system/discounts/queryDiscountsCdkList',
    method: 'get',
    params: query
  });
};

/**
 * 优惠券作废
 */
export const discountsCdkDisabled = (data: DiscountsCdkLogVO) => {
  return request({
    url: '/system/discounts/discountsCdkDisabled',
    method: 'post',
    data: data
  });
};
